package com.ruoyi.consumer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consumer.mapper.CDealCompanyMapper;
import com.ruoyi.consumer.domain.CDealCompany;
import com.ruoyi.consumer.service.ICDealCompanyService;

/**
 * 公司钱包流水记录Service业务层处理
 * 
 * @author YFENTEST
 * @date 2023-12-09
 */
@Service
public class CDealCompanyServiceImpl implements ICDealCompanyService 
{
    @Autowired
    private CDealCompanyMapper cDealCompanyMapper;

    /**
     * 查询公司钱包流水记录
     * 
     * @param dealRecordId 公司钱包流水记录主键
     * @return 公司钱包流水记录
     */
    @Override
    public CDealCompany selectCDealCompanyByDealRecordId(Integer dealRecordId)
    {
        return cDealCompanyMapper.selectCDealCompanyByDealRecordId(dealRecordId);
    }

    /**
     * 查询公司钱包流水记录列表
     * 
     * @param cDealCompany 公司钱包流水记录
     * @return 公司钱包流水记录
     */
    @Override
    public List<CDealCompany> selectCDealCompanyList(CDealCompany cDealCompany)
    {
        return cDealCompanyMapper.selectCDealCompanyList(cDealCompany);
    }

    /**
     * 新增公司钱包流水记录
     * 
     * @param cDealCompany 公司钱包流水记录
     * @return 结果
     */
    @Override
    public int insertCDealCompany(CDealCompany cDealCompany)
    {
        cDealCompany.setCreateTime(DateUtils.getNowDate());
        return cDealCompanyMapper.insertCDealCompany(cDealCompany);
    }

    /**
     * 修改公司钱包流水记录
     * 
     * @param cDealCompany 公司钱包流水记录
     * @return 结果
     */
    @Override
    public int updateCDealCompany(CDealCompany cDealCompany)
    {
        cDealCompany.setUpdateTime(DateUtils.getNowDate());
        return cDealCompanyMapper.updateCDealCompany(cDealCompany);
    }

    /**
     * 批量删除公司钱包流水记录
     * 
     * @param dealRecordIds 需要删除的公司钱包流水记录主键
     * @return 结果
     */
    @Override
    public int deleteCDealCompanyByDealRecordIds(Integer[] dealRecordIds)
    {
        return cDealCompanyMapper.deleteCDealCompanyByDealRecordIds(dealRecordIds);
    }

    /**
     * 删除公司钱包流水记录信息
     * 
     * @param dealRecordId 公司钱包流水记录主键
     * @return 结果
     */
    @Override
    public int deleteCDealCompanyByDealRecordId(Integer dealRecordId)
    {
        return cDealCompanyMapper.deleteCDealCompanyByDealRecordId(dealRecordId);
    }
}
